package com.hjn.springboot.springbootbacklog.controller;

import com.hjn.springboot.springbootbacklog.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author: huaijn
 * @create: 2022/5/1 22:18
 * @description: 测试springboot继承logback
 **/
@Controller
@Slf4j
public class LogController {
    @Autowired
    LogService logService;

    @RequestMapping("/queryCount")
    @ResponseBody
    public Integer queryCount() {
        log.info("查询有多少条数据");
        log.debug("查询有多少条数据");
        log.warn("查询有多少条数据");
        log.error("查询有多少条数据");
        return logService.queryCount();
    }
}
